type replaced = IReplace<'types are fun!', 'fun', 'awesome'> // 期望是 'types are awesome!'

type IReplace<
  S extends string,
  T extends string,
  R extends string> = S extends `${infer O}${T}${infer P}`
  ? `${O}${R}${P}`
  : S